package cn.bookingsmart.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class TransferSchedule {
    private static Logger log = LoggerFactory.getLogger(TransferSchedule.class);

    @Scheduled(cron = "0 */1 * * * ?")
    public void doHotelScoreUpdate() throws Exception {
        String tname = Thread.currentThread().getId() + "-" + Thread.currentThread().getName();
        System.out.println("[" + tname + "]长耗时任务开始...");
        long start = System.currentTimeMillis();
        Thread.sleep(60 * 1000);
        long end = System.currentTimeMillis();
        System.out.println("[" + tname + "]长耗时任务结束，耗时：" + (end - start) + "ms.");
    }
}
